
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1-2 我的第一个beego项目 · Beego微服务基础实战笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="雪山凌狐">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-material-light.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ad/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../css/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="1-3 第一个beego项目剖析.html" />
    
    
    <link rel="prev" href="1-1 环境安装.html" />
    

    
        <link rel="shortcut icon" href='../assets/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../assets/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.xueshanlinghu.com" target="_blank" class="custom-link">雪山凌狐教程</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Beego 微服务基础实战笔记介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Catalog.html">
            
                <a href="../Catalog.html">
            
                    
                    课程目录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    一、Beego 前奏
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="1-1 环境安装.html">
            
                <a href="1-1 环境安装.html">
            
                    
                    1-1 环境安装
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="1-2 我的第一个beego项目.html">
            
                <a href="1-2 我的第一个beego项目.html">
            
                    
                    1-2 我的第一个beego项目
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="1-3 第一个beego项目剖析.html">
            
                <a href="1-3 第一个beego项目剖析.html">
            
                    
                    1-3 第一个beego项目剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="1-4 controller运行原理.html">
            
                <a href="1-4 controller运行原理.html">
            
                    
                    1-4 controller运行原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="1-5 第一个controller.html">
            
                <a href="1-5 第一个controller.html">
            
                    
                    1-5 第一个controller
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../chapter2/">
            
                <a href="../chapter2/">
            
                    
                    二、Beego 前后端数据交互
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter2/2-1 模板渲染介绍.html">
            
                <a href="../chapter2/2-1 模板渲染介绍.html">
            
                    
                    2-1 模板渲染介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter2/2-2 结构体详解.html">
            
                <a href="../chapter2/2-2 结构体详解.html">
            
                    
                    2-2 结构体详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../chapter2/2-3 结构体渲染.html">
            
                <a href="../chapter2/2-3 结构体渲染.html">
            
                    
                    2-3 结构体渲染
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../chapter2/2-4 数组详解.html">
            
                <a href="../chapter2/2-4 数组详解.html">
            
                    
                    2-4 数组详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../chapter2/2-5 数组渲染.html">
            
                <a href="../chapter2/2-5 数组渲染.html">
            
                    
                    2-5 数组渲染
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../chapter2/2-6 结构体数组详解.html">
            
                <a href="../chapter2/2-6 结构体数组详解.html">
            
                    
                    2-6 结构体数组详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../chapter2/2-7 结构体数组渲染.html">
            
                <a href="../chapter2/2-7 结构体数组渲染.html">
            
                    
                    2-7 结构体数组渲染
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Summary.html">
            
                <a href="../Summary.html">
            
                    
                    课程总结
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >1-2 我的第一个beego项目</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;-beego-&#x9879;&#x76EE;"><b></b>&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A; beego &#x9879;&#x76EE;</a></li><ul><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x521B;&#x5EFA;&#x9879;&#x76EE;"><b></b>&#x521B;&#x5EFA;&#x9879;&#x76EE;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;"><b></b>&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;</a></li></ul></ul></ul></div><h1 id="&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;-beego-&#x9879;&#x76EE;"><a name="&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;-beego-&#x9879;&#x76EE;" class="anchor-navigation-ex-anchor" href="#&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;-beego-&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6211;&#x7684;&#x7B2C;&#x4E00;&#x4E2A; beego &#x9879;&#x76EE;</h1>
<h3 id="&#x521B;&#x5EFA;&#x9879;&#x76EE;"><a name="&#x521B;&#x5EFA;&#x9879;&#x76EE;" class="anchor-navigation-ex-anchor" href="#&#x521B;&#x5EFA;&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x521B;&#x5EFA;&#x9879;&#x76EE;</h3>
<p>&#x5728;&#x4EFB;&#x610F;&#x8D77;&#x59CB;&#x6587;&#x4EF6;&#x5939;&#x5747;&#x53EF;&#x6267;&#x884C;&#xFF1A;</p>
<pre class="language-"><code class="lang-powershell"><span class="token comment"># bee new [project_name]</span>
bee new beego_project
</code></pre>
<pre class="language-"><code class="lang-powershell"><span class="token function">PS</span> E:\ProgramFiles\gopath\src&gt; bee new beego_project
2022/06/03 17:56:16<span class="token punctuation">.</span>622 <span class="token namespace">[D]</span>  init global config instance failed<span class="token punctuation">.</span> <span class="token keyword">If</span> you <span class="token keyword">do</span> not use this<span class="token punctuation">,</span> just ignore it<span class="token punctuation">.</span>  open conf/app<span class="token punctuation">.</span>conf: The system cannot find the path specified<span class="token punctuation">.</span>
2022/06/03 17:56:17 INFO     &#x25B6; 0001 Generate new project support go modules<span class="token punctuation">.</span>
2022/06/03 17:56:17 INFO     &#x25B6; 0002 Creating application<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
        create   E:\ProgramFiles\gopath\src\beego_project\go<span class="token punctuation">.</span>mod
        create   E:\ProgramFiles\gopath\src\beego_project\
        create   E:\ProgramFiles\gopath\src\beego_project\conf\
        create   E:\ProgramFiles\gopath\src\beego_project\controllers\
        create   E:\ProgramFiles\gopath\src\beego_project\models\
        create   E:\ProgramFiles\gopath\src\beego_project\routers\
        create   E:\ProgramFiles\gopath\src\beego_project\tests\
        create   E:\ProgramFiles\gopath\src\beego_project\static\
        create   E:\ProgramFiles\gopath\src\beego_project\static\js\
        create   E:\ProgramFiles\gopath\src\beego_project\static\css\
        create   E:\ProgramFiles\gopath\src\beego_project\static\img\
        create   E:\ProgramFiles\gopath\src\beego_project\views\
        create   E:\ProgramFiles\gopath\src\beego_project\conf\app<span class="token punctuation">.</span>conf
        create   E:\ProgramFiles\gopath\src\beego_project\controllers\default<span class="token punctuation">.</span>go
        create   E:\ProgramFiles\gopath\src\beego_project\views\index<span class="token punctuation">.</span>tpl
        create   E:\ProgramFiles\gopath\src\beego_project\routers\router<span class="token punctuation">.</span>go
        create   E:\ProgramFiles\gopath\src\beego_project\tests\default_test<span class="token punctuation">.</span>go
        create   E:\ProgramFiles\gopath\src\beego_project\main<span class="token punctuation">.</span>go
2022/06/03 17:56:17 SUCCESS  &#x25B6; 0003 New application successfully created!
</code></pre>
<p>&#x4F1A;&#x5728; GOPATH &#x7684; src &#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x521B;&#x5EFA;&#x8BE5;&#x9879;&#x76EE;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x3002;</p>
<p>&#x67E5;&#x770B; bee &#x5DE5;&#x5177;&#x6709;&#x54EA;&#x4E9B;&#x547D;&#x4EE4;&#xFF1A;</p>
<p>&#x8F93;&#x5165; <code>bee</code> &#x547D;&#x4EE4;&#x5373;&#x53EF;&#x3002;</p>
<pre class="language-"><code class="lang-powershell"><span class="token function">PS</span> E:\ProgramFiles\gopath\src&gt; bee
2022/06/03 17:57:44<span class="token punctuation">.</span>824 <span class="token namespace">[D]</span>  init global config instance failed<span class="token punctuation">.</span> <span class="token keyword">If</span> you <span class="token keyword">do</span> not use this<span class="token punctuation">,</span> just ignore it<span class="token punctuation">.</span>  open conf/app<span class="token punctuation">.</span>conf: The system cannot find the path specified<span class="token punctuation">.</span>
Bee is a Fast and Flexible tool <span class="token keyword">for</span> managing your Beego Web Application<span class="token punctuation">.</span>

You are <span class="token keyword">using</span> bee <span class="token keyword">for</span> beego v2<span class="token punctuation">.</span>x<span class="token punctuation">.</span> <span class="token keyword">If</span> you are working on beego v1<span class="token punctuation">.</span>x<span class="token punctuation">,</span> please downgrade version to bee v1<span class="token punctuation">.</span>12<span class="token punctuation">.</span>0

USAGE
    bee command <span class="token namespace">[arguments]</span>

AVAILABLE COMMANDS

    version     Prints the current Bee version
    migrate     Runs database migrations
    api         Creates a Beego API application
    bale        Transforms non-Go files to Go source files
    fix         Fixes your application by making it compatible with newer versions of Beego
    pro         Source code generator
    dev         Commands which used to help to develop beego and bee
    dlv         <span class="token function">Start</span> a debugging session <span class="token keyword">using</span> Delve
    dockerize   Generates a Dockerfile <span class="token keyword">for</span> your Beego application
    generate    Source code generator
    hprose      Creates an RPC application based on Hprose and Beego frameworks
    new         Creates a Beego application
    pack        Compresses a Beego application into a single file
    rs          Run customized scripts
    run         Run the application by starting a local development server
    server      serving static content over HTTP on port
    update      Update Bee

Use bee help <span class="token namespace">[command]</span> <span class="token keyword">for</span> more information about a command<span class="token punctuation">.</span>

ADDITIONAL HELP TOPICS


Use bee help <span class="token namespace">[topic]</span> <span class="token keyword">for</span> more information about that topic<span class="token punctuation">.</span>
</code></pre>
<h3 id="&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;"><a name="&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;" class="anchor-navigation-ex-anchor" href="#&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x542F;&#x52A8;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;</h3>
<p>&#x8FDB;&#x5165;&#x6211;&#x4EEC;&#x521B;&#x5EFA;&#x7684; beego &#x9879;&#x76EE;&#x76EE;&#x5F55;&#x6267;&#x884C;&#xFF1A;<code>bee run</code>&#xFF0C;&#x8FD9;&#x79CD;&#x6267;&#x884C;&#x65B9;&#x6CD5;&#x652F;&#x6301;&#x5B9E;&#x65F6;&#x8C03;&#x8BD5;&#xFF0C;&#x7C7B;&#x4F3C; Flask &#x7684;&#x8C03;&#x8BD5;&#x6A21;&#x5F0F;&#xFF0C;&#x4FEE;&#x6539;&#x6E90;&#x7801;&#x540E;&#x4F1A;&#x81EA;&#x52A8;&#x68C0;&#x6D4B;&#x5E76;&#x91CD;&#x8F7D;&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<p>&#x5728;&#x6267;&#x884C;&#x542F;&#x52A8;&#x9879;&#x76EE;&#x524D;&#xFF0C;&#x9700;&#x8981;&#x751F;&#x6210; <code>go.sum</code> &#x6587;&#x4EF6;&#xFF0C;&#x9ED8;&#x8BA4;&#x6CA1;&#x6709;&#x3002;</p>
<pre class="language-"><code class="lang-powershell">cd beego_project
go mod tidy
bee run
</code></pre>
<p>&#x9996;&#x6B21;&#x542F;&#x52A8;&#x4F1A;&#x5F39;&#x51FA;&#x9632;&#x706B;&#x5899;&#x63D0;&#x793A;&#xFF0C;&#x5141;&#x8BB8;&#x5373;&#x53EF;&#x3002;</p>
<p><a href="assets/image-20220603180416650.png" data-lightbox="87226145-de4f-4743-bcb9-e046caf00790" data-title="image-20220603180416650"><img src="assets/image-20220603180416650.png" alt="image-20220603180416650"></a></p>
<p>&#x8FD0;&#x884C;&#x8F93;&#x51FA;&#xFF1A;</p>
<pre class="language-"><code class="lang-powershell"><span class="token function">PS</span> E:\ProgramFiles\gopath\src&gt; cd beego_project
<span class="token function">PS</span> E:\ProgramFiles\gopath\src\beego_project&gt; go mod tidy
go: downloading github<span class="token punctuation">.</span>com/beego/beego/v2 v2<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1
go: downloading golang<span class="token punctuation">.</span>org/x/crypto v0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20200622213623-75b288015ac9
go: downloading golang<span class="token punctuation">.</span>org/x/tools v0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20201211185031-d93e913c1a58
go: downloading github<span class="token punctuation">.</span>com/stretchr/testify v1<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0
go: downloading github<span class="token punctuation">.</span>com/elazarl/go-bindata-assetfs v1<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0
go: downloading github<span class="token punctuation">.</span>com/mitchellh/mapstructure v1<span class="token punctuation">.</span>3<span class="token punctuation">.</span>3
go: downloading gopkg<span class="token punctuation">.</span>in/yaml<span class="token punctuation">.</span>v2 v2<span class="token punctuation">.</span>2<span class="token punctuation">.</span>8
go: downloading gopkg<span class="token punctuation">.</span>in/check<span class="token punctuation">.</span>v1 v1<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20200227125254-8fa46927fb4f
go: downloading github<span class="token punctuation">.</span>com/golang/protobuf v1<span class="token punctuation">.</span>4<span class="token punctuation">.</span>2
go: downloading github<span class="token punctuation">.</span>com/niemeyer/pretty v0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20200227124842-a10e7caefd8e
go: downloading golang<span class="token punctuation">.</span>org/x/sys v0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20200930185726-fdedc70b468f
go: downloading github<span class="token punctuation">.</span>com/kr/text v0<span class="token punctuation">.</span>1<span class="token punctuation">.</span>0
go: downloading github<span class="token punctuation">.</span>com/google/go-cmp v0<span class="token punctuation">.</span>5<span class="token punctuation">.</span>0
go: downloading google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf v1<span class="token punctuation">.</span>23<span class="token punctuation">.</span>0
go: downloading golang<span class="token punctuation">.</span>org/x/net v0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0-20201021035429-f5854403a974
go: downloading golang<span class="token punctuation">.</span>org/x/text v0<span class="token punctuation">.</span>3<span class="token punctuation">.</span>3
<span class="token function">PS</span> E:\ProgramFiles\gopath\src\beego_project&gt; bee run
2022/06/03 18:03:32 WARN     &#x25B6; 0001 Get bee releases <span class="token keyword">from</span> github error: Get <span class="token string">&quot;https://api.github.com/repos/beego/bee/releases&quot;</span>: x509: certificate signed by unknown authority
2022/06/03 18:03:32 WARN     &#x25B6; 0002 Has no releases
2022/06/03 18:03:32 WARN     &#x25B6; 0003 Open <span class="token punctuation">.</span>lastPublishedAt file err: open C:\Users\xueshanlinghu\<span class="token punctuation">.</span>beego/<span class="token punctuation">.</span>lastPublishedAt: The system cannot find the file specified<span class="token punctuation">.</span>
______
<span class="token punctuation">|</span> ___ \
<span class="token punctuation">|</span> <span class="token punctuation">|</span>_/ <span class="token operator">/</span>  ___   ___
<span class="token punctuation">|</span> ___ \ <span class="token operator">/</span> _ \ <span class="token operator">/</span> _ \
<span class="token punctuation">|</span> <span class="token punctuation">|</span>_/ <span class="token operator">/</span><span class="token punctuation">|</span>  __/<span class="token punctuation">|</span>  __/
\____/  \___<span class="token punctuation">|</span> \___<span class="token punctuation">|</span> v2<span class="token punctuation">.</span>0<span class="token punctuation">.</span>2
2022/06/03 18:03:32 INFO     &#x25B6; 0004 <span class="token keyword">Using</span> <span class="token string">&apos;beego_project&apos;</span> as <span class="token string">&apos;appname&apos;</span>
2022/06/03 18:03:32 INFO     &#x25B6; 0005 Initializing watcher<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
github<span class="token punctuation">.</span>com/beego/beego/v2
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/flags
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/fieldnum
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/<span class="token function">set</span>
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/genname
golang<span class="token punctuation">.</span>org/x/sys/internal/unsafeheader
golang<span class="token punctuation">.</span>org/x/mod/semver
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/pragma
golang<span class="token punctuation">.</span>org/x/text/transform
github<span class="token punctuation">.</span>com/prometheus/common/internal/bitbucket<span class="token punctuation">.</span>org/ww/goautoneg
github<span class="token punctuation">.</span>com/cespare/xxhash/v2
github<span class="token punctuation">.</span>com/shiena/ansicolor
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/detrand
gopkg<span class="token punctuation">.</span>in/yaml<span class="token punctuation">.</span>v2
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/errors
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/version
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/encoding/protowire
github<span class="token punctuation">.</span>com/prometheus/common/model
golang<span class="token punctuation">.</span>org/x/text/unicode/bidi
golang<span class="token punctuation">.</span>org/x/text/unicode/norm
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/reflect/protoreflect
golang<span class="token punctuation">.</span>org/x/tools/internal/event/label
golang<span class="token punctuation">.</span>org/x/text/secure/bidirule
golang<span class="token punctuation">.</span>org/x/tools/internal/event/keys
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/reflect/protoregistry
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/mapsort
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/strs
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/fieldsort
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/runtime/protoiface
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/descfmt
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/descopts
golang<span class="token punctuation">.</span>org/x/tools/internal/event/core
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/encoding/text
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/encoding/messageset
golang<span class="token punctuation">.</span>org/x/net/idna
github<span class="token punctuation">.</span>com/mitchellh/mapstructure
golang<span class="token punctuation">.</span>org/x/sys/windows
golang<span class="token punctuation">.</span>org/x/tools/internal/event
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/proto
golang<span class="token punctuation">.</span>org/x/tools/internal/gocommand
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/encoding/defval
golang<span class="token punctuation">.</span>org/x/tools/internal/packagesinternal
github<span class="token punctuation">.</span>com/beego/beego/v2/core/utils
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/encoding/prototext
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/filedesc
github<span class="token punctuation">.</span>com/beego/beego/v2/server/web/grace
golang<span class="token punctuation">.</span>org/x/crypto/acme
github<span class="token punctuation">.</span>com/beego/beego/v2/core/logs
golang<span class="token punctuation">.</span>org/x/tools/go/internal/packagesdriver
golang<span class="token punctuation">.</span>org/x/tools/internal/typesinternal
golang<span class="token punctuation">.</span>org/x/tools/go/internal/gcimporter
github<span class="token punctuation">.</span>com/beego/beego/v2/server/web/session
github<span class="token punctuation">.</span>com/beego/beego/v2/core/admin
github<span class="token punctuation">.</span>com/beego/beego/v2/core/config
golang<span class="token punctuation">.</span>org/x/crypto/acme/autocert
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/encoding/tag
github<span class="token punctuation">.</span>com/beego/beego/v2/server/web/context
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/impl
golang<span class="token punctuation">.</span>org/x/tools/go/gcexportdata
github<span class="token punctuation">.</span>com/beego/beego/v2/server/web/context/<span class="token keyword">param</span>
golang<span class="token punctuation">.</span>org/x/tools/go/packages
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/internal/filetype
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/runtime/protoimpl
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/types/known/anypb
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/types/known/durationpb
google<span class="token punctuation">.</span>golang<span class="token punctuation">.</span>org/protobuf/types/known/timestamppb
github<span class="token punctuation">.</span>com/golang/protobuf/proto
github<span class="token punctuation">.</span>com/golang/protobuf/ptypes/any
github<span class="token punctuation">.</span>com/golang/protobuf/ptypes/duration
github<span class="token punctuation">.</span>com/golang/protobuf/ptypes/timestamp
github<span class="token punctuation">.</span>com/prometheus/client_model/go
github<span class="token punctuation">.</span>com/golang/protobuf/ptypes
github<span class="token punctuation">.</span>com/matttproud/golang_protobuf_extensions/pbutil
github<span class="token punctuation">.</span>com/prometheus/client_golang/prometheus/internal
github<span class="token punctuation">.</span>com/prometheus/common/expfmt
github<span class="token punctuation">.</span>com/prometheus/client_golang/prometheus
github<span class="token punctuation">.</span>com/prometheus/client_golang/prometheus/promhttp
github<span class="token punctuation">.</span>com/beego/beego/v2/server/web
beego_project/controllers
beego_project/routers
beego_project
2022/06/03 18:03:48 SUCCESS  &#x25B6; 0006 Built Successfully!
2022/06/03 18:03:48 INFO     &#x25B6; 0007 Restarting <span class="token string">&apos;beego_project.exe&apos;</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
2022/06/03 18:03:48 SUCCESS  &#x25B6; 0008 <span class="token string">&apos;./beego_project.exe&apos;</span> is running<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
2022/06/03 18:03:51<span class="token punctuation">.</span>941 <span class="token namespace">[I]</span> <span class="token namespace">[parser.go:413]</span>  generate router <span class="token keyword">from</span> comments

2022/06/03 18:03:51<span class="token punctuation">.</span>974 <span class="token namespace">[I]</span> <span class="token namespace">[server.go:241]</span>  http server Running on http:<span class="token operator">/</span><span class="token operator">/</span>:8080
</code></pre>
<p>&#x9996;&#x6B21;&#x542F;&#x52A8;&#x9879;&#x76EE;&#x4F1A;&#x5BF9;&#x9879;&#x76EE;&#x8FDB;&#x884C;&#x7F16;&#x8BD1; build&#xFF0C;&#x5728; <code>%GOPATH%\bin</code> &#x4E0B;&#x751F;&#x6210;&#x4E86; <code>beego_project.exe</code> &#x6587;&#x4EF6;&#xFF08;&#x4E0B;&#x6B21;&#x542F;&#x52A8;&#x65E0;&#x9700;&#x518D;&#x7F16;&#x8BD1;&#x90A3;&#x4E48;&#x4E45;&#xFF09;&#x3002;&#x7136;&#x540E;&#x4F1A;&#x81EA;&#x52A8;&#x542F;&#x52A8;&#x8BE5;&#x670D;&#x52A1;&#x3002;&#x5728;&#x672C;&#x5730;&#x542F;&#x52A8;&#x4E00;&#x4E2A;&#x9875;&#x9762;&#xFF0C;&#x4F60;&#x6253;&#x5F00;&#x6D4F;&#x89C8;&#x5668;&#xFF0C;&#x8F93;&#x5165; <code>http://localhost:8080</code> &#x5373;&#x53EF;&#x770B;&#x5230;&#x9875;&#x9762;&#xFF1A;</p>
<p><a href="assets/image-20220603180709846.png" data-lightbox="2a8961e5-4bb4-4f17-80c7-7ae0eb2a141c" data-title="image-20220603180709846"><img src="assets/image-20220603180709846.png" alt="image-20220603180709846"></a></p>
<p>&#x6B64;&#x65F6;&#x8868;&#x793A;&#x4F60;&#x7684;&#x7B2C;&#x4E00;&#x4E2A; beego &#x9879;&#x76EE;&#x90E8;&#x7F72;&#x548C;&#x8FD0;&#x884C;&#x6210;&#x529F;&#xFF01; </p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; <a href="http://www.xueshanlinghu.com" target="_blank">&#x96EA;&#x5C71;&#x51CC;&#x72D0;&#x6559;&#x7A0B;</a> all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-06-05 11:18:31
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="1-1 环境安装.html" class="navigation navigation-prev " aria-label="Previous page: 1-1 环境安装">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="1-3 第一个beego项目剖析.html" class="navigation navigation-next " aria-label="Next page: 1-3 第一个beego项目剖析">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1-2 我的第一个beego项目","level":"1.3.2","depth":2,"next":{"title":"1-3 第一个beego项目剖析","level":"1.3.3","depth":2,"path":"chapter1/1-3 第一个beego项目剖析.md","ref":"./chapter1/1-3 第一个beego项目剖析.md","articles":[]},"previous":{"title":"1-1 环境安装","level":"1.3.1","depth":2,"path":"chapter1/1-1 环境安装.md","ref":"./chapter1/1-1 环境安装.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","-search","-lunr","-sharing","-livereload","-highlight","prism","prism-themes","fontsettings","back-to-top-button","expandable-chapters-small","code","search-pro","splitter","donate","tbfed-pagefooter","pageview-count","auto-scroll-table","lightbox","anchor-navigation-ex","sitemap-general","ad","autotheme","advanced-emoji","flexible-alerts","statistics","push-bd"],"styles":{"website":"/css/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy <a href='http://www.xueshanlinghu.com'>雪山凌狐教程</a>","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-material-light.css"]},"ad":{"contentBottom":false},"statistics":{"bd_url":"https://hm.baidu.com/hm.js","cnzz_url":"https://s95.cnzz.com/z_stat.php","google_url":"https://www.googletagmanager.com/gtag/js","bd_token":""},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"donate":{"alipay":"/beego-basic-notes/assets/alipay-code.jpg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"/beego-basic-notes/assets/wechatpay-code.jpg","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://doc.xueshanlinghu.com/beego-basic-notes/"},"fontsettings":{"family":"sans","size":2,"theme":"white"},"anchor-navigation-ex":{"showLevel":false,"associatedWithSummary":true,"mode":"float","showGoTop":false,"printLog":false,"multipleH1":true,"float":{"floatIcon":"fa fa-navicon","showLevelIcon":true,"level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right"},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"favicon":{"shortcut":"/assets/favicon.ico","bookmark":"/assets/favicon.ico"},"lightbox":{"jquery":true,"sameUuid":false},"push-bd":{},"back-to-top-button":{},"pageview-count":{},"prism-themes":{},"expandable-chapters-small":{},"flexible-alerts":{"style":"flat","note":{"label":"说明","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"提示","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"警告","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"注意","icon":"fa fa-ban","className":"danger"},"question":{"label":"问题","icon":"fa fa-question-circle","className":"question"}},"autotheme":{"white":[25,25,25,25,25,25,25,25],"sepia":[25,25,25,25,25,25],"night":[20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},"advanced-emoji":{"embedEmojis":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"雪山凌狐","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"CATALOG_FOR_GITBOOK.md"},"variables":{},"title":"Beego微服务基础实战笔记","language":"zh-hans","links":{"sidebar":{"雪山凌狐教程":"http://www.xueshanlinghu.com"}},"gitbook":"3.2.3","description":"Beego微服务基础实战笔记，Beego入门从此开始"},"file":{"path":"chapter1/1-2 我的第一个beego项目.md","mtime":"2022-06-05T03:18:31.468Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-06-06T15:13:14.701Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ad/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-autotheme/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-statistics/statistics.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-push-bd/plugin.js"></script>
        
    

    </body>
</html>

